# 作者：宋安康
# 开发时间：2023/6/11 19:46
import socket

HOST = '192.168.31.199'
PORT = 5050

client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect((HOST, PORT))

while True:
    msg = input("Enter a message to send: ")
    client_socket.send(msg.encode())
    if msg == "quit":
        break
    reply = client_socket.recv(1024).decode()
    print(f"Received reply: {reply}")

client_socket.close()
